# 简写
def simple_function(a, b):
    return a + b

# 完整
def all_function(name: str, age: int) -> str:
    return f'{name} is {age} years old'

# 可变参数
def var_function(name: str, *args):
    print(f'{name} 总共花费: ')
    total = 0
    for arg in args:
        total += arg
    print(total)

# 关键字参数
def kwargs_function(name:str, **kwargs):
    print(f'{name} 的清单: ')
    for key, value in kwargs.items():
        print(f'{key}: {value}')

# lambda
print(list(filter(lambda x:x % 2 == 0, range(1, 11, 1))))


print(simple_function(1, 2))
print(all_function("Jack", 2))
var_function("Jack", 2, 2, 2, 2, 2, 100)
kwargs_function("Jack", rice=1, fish=2, water=3)